import math
def main():
    myMessage= '敌共00人有00总10人'
    myKey = 3
    plaintext = decrypt(myKey, myMessage)
    print(plaintext+"|")
def decrypt(key, message):
    numOfColumns = math.ceil(len(message) / key)
    plaintext = [""] * numOfColumns
    for col in range(numOfColumns):
        position = col
        while position < len(message):
            plaintext[col] += message[position]
            position += numOfColumns
    return ''.join(plaintext)

if __name__ == '__main__':
   main()
        
   
   
   